import {createBrowserRouter} from 'react-router-dom'
import App from '../App'
import Chat from '../pages/chat'
import Login from '../pages/login'
import Oauth from '../pages/login/oauth'
import Home from '../pages/home'
import Website from '../pages/website'
import Message from '../pages/message'
import Profile from '../pages/profile'


const router = createBrowserRouter([
    {
        index:true,
        element:<Login></Login>
    },
    {
        path:'/',
        element:<App></App>,
        children:[
            {
                path:'/home',
                element:<Home></Home>
            },
            {
                path:'/website',
                element:<Website></Website>
            },
            {
                path:'/message',
                element:<Message></Message>
            },
            {
                path:'/profile',
                element:<Profile></Profile>
            }
        ]
    },
    {
        path:'/chat',
        element:<Chat></Chat>
    },
    {
        path:'/login',
        element:<Login></Login>
    },
    {
        path:'/oauth',
        element:<Oauth></Oauth>
    }
])

export default router